//
//  WBDemoViewController.swift
//  weibo
//
//  Created by iobit on 2017/06/01.
//  Copyright © 2017 zhuxu. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }
    

    
    @objc func showNext() {
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBDemoViewController {
    override func setupTableView() {
        super.setupTableView()
        //navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: .plain, target: self, action: #selector(showNext))
        
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
}
